import React, { Component } from 'react'
import { Button, Spinner } from 'react-bootstrap'

class SpinnerButton extends Component {
  render () {
    const { style } = this.props
    return (
      <Button style = {{ ...style }} disabled>
        <Spinner animation = {'border'} as = {'span'} size = {'sm'}
                 role = {'status'} />
        {this.props.children}
      </Button>
    )
  }
}

export default SpinnerButton
